﻿@using QqhrCitizen.Models
@using QqhrCitizen.Models.ViewModel
@{
    Course course = ViewBag.Course as Course;
    List<vLession> lessions = ViewBag.Lessions as List<vLession>;
    List<Course> lstLession = ViewBag.LstCourse as List<Course>;
    ViewBag.Title = "课程简介_齐齐哈尔市民学习网";
    ViewBag.Search = "课程名、标签";
}
<script>
    $("#topmenu_course").attr("class", "item_selected");
</script>
<div id="d_menu" class="d-menu menu-cou">
    <div id="d_menu_c" class="d-menu-c">
        <!-- region start: menu -->
        <div id="d_headmenu" class="d-headmenu">
            <div class="body">
                <a id="headmenu_default" class="item" href="/Course/Index" target="_parent">课程首页</a>
                <a id="headmenu_discovery" class="item" href="/Course/Discovery/0" target="_parent">发现课程</a>
            </div>
        </div>
        <!-- region end: menu -->
    </div>
</div>
<div id="d_main" class="d-main" style="min-width: 1000px;">
    <div class="container">
        <div id="d_bottom" class="d-bottom" style="visibility: hidden; position: relative;">
            <div class="d-bottom-c">
                <div id="d_scrolltop" class="d-scrolltop" style="right: -70px;">
                    <span class="t" onclick="$('html,body').animate({scrollTop: '0px'}, 800);">顶部</span>
                </div>
            </div>
        </div>
        <div class="d-row" style="padding: 20px 0 0 0;">
            <div class="d-row-c">
                <div class="d-col-2-8">
                    <div class="contentarea">
                        <!-- region start: 课程信息 -->
                        <div id="d_coursedetail" class="d-coursedetail">
                            <input type="hidden" id="hdCurrentuser" value="@(ViewBag.CurrentUser!=null? @ViewBag.CurrentUser.Username:"")" />
                            <div class="cover">
                                <img src="/Course/ShowPicture/@course.ID" />
                            </div>
                            <div class="info">
                                <div class="title">@course.Title</div>
                                <div class="stat">
                                    <span id="info1">分类：@course.TypeDictionary.TypeValue </span>
                                </div>
                                <div class="stat">
                                    <span id="info1">学习人次：@course.Browses</span>
                                </div>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <!-- region end: 课程信息 -->
                        <!-- region start: 课程简介 -->
                        <div id="d_courseintro" class="d-courseintro">
                            <div class="head">课程简介</div><div class="body">
                                <div class="area txt-justify">
                                    @course.Description
                                </div>
                            </div>
                        </div><!-- region end: 课程简介 --><!-- region start: 课件列表 -->
                        <hr style="border: none; height: 1px; background-color: #ccc; margin: 20px 25px 0 0;">
                        <div id="d_courseware" class="d-courseware">
                            <div class="head">课时列表</div>
                            <div class="body">
                                @foreach (var item in lessions)
                                {
                                    <div class="item" id="Ware_908">
                                        <a class="name lession" href="/Course/LessionDetails/@item.ID" title="@item.Title">@item.Title</a>
                                        <span class="hour"></span><span class="sign">@item.Browses 人学过</span>
                                    </div>
                                }
                                <div class="clear"></div>
                            </div>
                        </div>
                        <!-- region end: 课件列表 -->
                        <!-- region start: 课程附件 -->
                        <!-- region end: 课程附件 -->
                        <!-- region start: 系列课程 --><!-- region end: 系列课程 -->
                        <hr style="border: none; height: 1px; background-color: #ccc; margin: 20px 25px 0 0;">
                        <!-- region start: 大家还喜欢的课程 -->
                        <div id="d_courselikebyuser" class="d-courselikebyuser">
                            <div class="head">相关课程</div>
                            <div class="body">
                                <div id="slide_courselikebyuser" class="slidecontainer">
                                    @if (lstLession != null)
                                    {
                                        foreach (var item in lstLession)
                                        {
                                             <div class="item">
                                              <div class="title">
                                                 <a href="/Course/Show/@item.ID">@item.Title</a>
                                              </div>
                                              <span class="signed">@item.Browses</span>
                                                 <a class="cover" href="/Course/Show/@item.ID" target="_blank">
                                                     <img class="imgCoursePicM" src="/Course/ShowPicture/@item.ID" title="@item.Title">
                                                 </a>
                                            </div>
                                        }
                                    }
                                    else
                                    {
                                        <span>暂不相关信息</span>
                                    }


                                </div>
                            </div>
                        </div>
                    </div>

                    <hr style="border: none; height: 1px; background-color: #ccc; margin: 20px 25px 0 0;">
                    <div class="d-coursecomment">
                        <div class="head">评论</div>
                        <!-- 多说评论框 start -->
                        <div class="ds-thread" data-thread-key="@course.CourseTypeID+@course.ID" data-title="@course.Title" data-url="@HttpContext.Current.Request.Url.ToString()"></div>
                        <!-- 多说评论框 end -->
                        <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
                        <script type="text/javascript">
                            var duoshuoQuery = { short_name: "qqhrcitizen" };
                            (function () {
                                var ds = document.createElement('script');
                                ds.type = 'text/javascript'; ds.async = true;
                                ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
                                ds.charset = 'UTF-8';
                                (document.getElementsByTagName('head')[0]
                                    || document.getElementsByTagName('body')[0]).appendChild(ds);
                            })();
                        </script>
                        <!-- 多说公共JS代码 end -->
                    </div>
                </div>
                <div class="d-col-2-4">
                    <div class="contentarea">
                        <div id="Record" class="d-courseaction well">
                            @if (lessions.Count > 0)
                            {
                                <p> 开始学习课程：@lessions[0].Title</p>
                                <p style="text-align: center; border-top: 1px solid #ccc; padding-top: 20px;">
                                    <a id="btnBeginLearnCourse" onclick="learnLession(@lessions[0].ID)" class="btn btn-big btn-orange" style="width: 150px;" target="_blank">开始学习</a>
                                </p>
                            }
                        </div>
                        <div id="d_learningactivitybycourse" class="d-learningactivitybycourse">
                            <div class="head">学习动态</div>
                            <div class="body">
                                <div id="feed_learningactivitybycourse" class="feedcontainer" style="top: 0px;">
                                    @foreach (var item in ViewBag.LstRecord as List<vStudyRecord>)
                                    {
                                        <div class="item">
                                            <a class="userportrait" href="#">
                                                @if (item.User.Picture == null)
                                                {
                                                    <img class="imgMemberPicS" style="height:20px;width:20px;vertical-align:baseline;" src="/Images/userphoto.png" />

                                                }
                                                else
                                                {
                                                    <img class="imgMemberPicS" style="height:20px;width:20px;vertical-align:baseline;" src="/User/ShowPicture/@item.UserID" />
                                                }

                                            </a>
                                            <span class="gender male"></span>
                                            <span class="createtime">@item.Time</span>
                                            <a class="owner" href="#">
                                                <span title="江毅乐悠悠">@item.User.Username</span>
                                            </a>
                                            <div class="content">
                                                观看了在线课程
                                                <a href="/Course/Show/@item.Lession.Course" title="@item.Lession.Course.Title" target="_blank">@item.Lession.Course.Title</a>
                                                中的：
                                                <a href="/Course/LessionDetails/@item.LessionID" title="@item.Lession.Title" target="_blank">@item.Lession.Title</a>
                                            </div>
                                        </div>
                                    }
                                </div>
                            </div>
                        </div>
                        <!-- region end: 学习动态 -->
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
</div>
